{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.5.0+35.ge26b05f.dirty\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import folium\n",
    "\n",
    "print(folium.__version__)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Circle and CircleMarker"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVh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FkPgo8Ym9keT4gICAgCiAgICAKICAgICAgICAgICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF8zMGNkYjI2YzhjMzY0YTY2OTM1OTVhNDE1ZTRhZDM3MyIgPjwvZGl2PgogICAgICAgIAo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCgogICAgICAgICAgICAKICAgICAgICAgICAgICAgIHZhciBib3VuZHMgPSBudWxsOwogICAgICAgICAgICAKCiAgICAgICAgICAgIHZhciBtYXBfMzBjZGIyNmM4YzM2NGE2NjkzNTk1YTQxNWU0YWQzNzMgPSBMLm1hcCgKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdtYXBfMzBjZGIyNmM4YzM2NGE2NjkzNTk1YTQxNWU0YWQzNzMnLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge2NlbnRlcjogWy0yNy41NzE3LC00OC42MjU2XSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpvb206IDksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhCb3VuZHM6IGJvdW5kcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyczogW10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JsZENvcHlKdW1wOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyX2JhN2VkYTAyNjNhZjRlNDU5ODU1YmI2MjdlYTVjYzQ2ID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgICAgICAgICAgewogICJhdHRyaWJ1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AgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBjaXJjbGVfbWFya2VyXzljODliZjJhMTVhYjQ1NWE5YjMwZGRjNGZhYmM2OWMwID0gTC5jaXJjbGVNYXJrZXIoCiAgICAgICAgICAgICAgICBbLTI3LjM1LCAtNDguOF0sCiAgICAgICAgICAgICAgICB7CiAgImJ1YmJsaW5nTW91c2VFdmVudHMiOiB0cnVlLAogICJjb2xvciI6ICJibGFjayIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogZmFsc2UsCiAgImZpbGxDb2xvciI6ICJibGFjayIsCiAgImZpbGxPcGFjaXR5IjogMC42LAogICJmaWxsUnVsZSI6ICJldmVub2RkIiwKICAibGluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAib3BhY2l0eSI6IDEsCiAgInJhZGl1cyI6IDI1LAogICJzdHJva2UiOiB0cnVlLAogICJ3ZWlnaHQiOiAzCn0KICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgLmFkZFRvKG1hcF8zMGNkYjI2YzhjMzY0YTY2OTM1OTVhNDE1ZTRhZDM3Myk7CiAgICAgICAgICAgIAogICAgCgogICAgICAgICAgICB2YXIgY2lyY2xlX2VhOWY2NGE2MTRhMDQwNDNhNDE3MmNkZWUwNDc1MjQzID0gTC5jaXJjbGUoCiAgICAgICAgICAgICAgICBbLTI3LjU1MTY2NywgLTQ4LjQ3ODg4OV0sCiAgICAgICAgICAgICAgICB7CiAgImJ1YmJsaW5nTW91c2VFdmVudHMiOiB0cnVlLAogICJjb2xvciI6ICJibGFjayIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogImdyZWVuIiwKICAiZmlsbE9wYWNpdHkiOiAwLjYsCiAgImZpbGxSdWxlIjogImV2ZW5vZGQiLAogICJsaW5lQ2FwIjogInJvdW5kIiwKICAibGluZUpvaW4iOiAicm91bmQiLAogICJvcGFjaXR5IjogMSwKICAicmFkaXVzIjogMTAwMDAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDEKfQogICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgLmJpbmRUb29sdGlwKCJJIGFtIGluIG1ldGVycyIpCiAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzMwY2RiMjZjOGMzNjRhNjY5MzU5NWE0MTVlNGFkMzczKTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHBvcHVwXzFlMDQ4ODYyM2MzMjRjYjk5ZDc0ZjMwZDYyODQwZTZmID0gTC5wb3B1cCh7bWF4V2lkdGg6ICczMDAnfSk7CgogICAgICAgICAgICAKICAgICAgICAgICAgICAgIHZhciBodG1sXzEwOTI0YTZkM2FjZTQxN2M5NmUxYjFjYTQzYzdiMDExID0gJCgnPGRpdiBpZD0iaHRtbF8xMDkyNGE2ZDNhY2U0MTdjOTZlMWIxY2E0M2M3YjAxMSIgc3R5bGU9IndpZHRoOiAxMDAuMCU7IGhlaWdodDogMTAwLjAlOyI+MTAwMDAgbWV0ZXJzPC9kaXY+JylbMF07CiAgICAgICAgICAgICAgICBwb3B1cF8xZTA0ODg2MjNjMzI0Y2I5OWQ3NGYzMGQ2Mjg0MGU2Zi5zZXRDb250ZW50KGh0bWxfMTA5MjRhNmQzYWNlNDE3Yzk2ZTFiMWNhNDNjN2IwMTEpOwogICAgICAgICAgICAKCiAgICAgICAgICAgIGNpcmNsZV9lYTlmNjRhNjE0YTA0MDQzYTQxNzJjZGVlMDQ3NTI0My5iaW5kUG9wdXAocG9wdXBfMWUwNDg4NjIzYzMyNGNiOTlkNzRmMzBkNjI4NDBlNmYpOwoKICAgICAgICAgICAgCiAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fbb992c9588>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import folium\n",
    "from folium.plugins.measure_control import MeasureControl\n",
    "\n",
    "m = folium.Map(location=[-27.5717, -48.6256], zoom_start=9)\n",
    "\n",
    "c = MeasureControl()\n",
    "c.add_to(m)\n",
    "\n",
    "radius = 50\n",
    "folium.CircleMarker(\n",
    "    location=[-27.55, -48.8],\n",
    "    radius=radius,\n",
    "    color='cornflowerblue',\n",
    "    stroke=False,\n",
    "    fill=True,\n",
    "    fill_opacity=0.6,\n",
    "    opacity=1,\n",
    "    popup='{} pixels'.format(radius),\n",
    "    tooltip='I am in pixels',\n",
    ").add_to(m)\n",
    "\n",
    "radius = 25\n",
    "folium.CircleMarker(\n",
    "    location=[-27.35, -48.8],\n",
    "    radius=radius,\n",
    "    color='black',\n",
    "    weight=3,\n",
    "    fill=False,\n",
    "    fill_opacity=0.6,\n",
    "    opacity=1,\n",
    ").add_to(m)\n",
    "\n",
    "radius = 10000\n",
    "folium.Circle(\n",
    "    location=[-27.551667, -48.478889],\n",
    "    radius=radius,\n",
    "    color='black',\n",
    "    weight=1,\n",
    "    fill_opacity=0.6,\n",
    "    opacity=1,\n",
    "    fill_color='green',\n",
    "    fill=False,  # gets overridden by fill_color\n",
    "    popup='{} meters'.format(radius),\n",
    "    tooltip='I am in meters',\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Features_3a.html'))\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### PolyLine"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCF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AgICAgICBsZWZ0OiAwLjAlOwogICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2QyZGNmZDA1M2ZmMzQwOWNhYWJiODgxN2QwYTc2MjYyIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF9kMmRjZmQwNTNmZjM0MDljYWFiYjg4MTdkMGE3NjI2MiA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF9kMmRjZmQwNTNmZjM0MDljYWFiYjg4MTdkMGE3NjI2MicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbNDEuOSwtOTcuM10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6b29tOiA0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4Qm91bmRzOiBib3VuZHMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcnM6IFtdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd29ybGRDb3B5SnVtcDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9jNjczYmMwN2NmYTA0YzE2YmEyOWIwNjE4MDA3MGQwMSA9IEwudGlsZUxheWVyKAogICAgICAgICAgIC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Tg4NjgzMl0sIFs0Mi4wODEzMzg2OCwgLTEwNS4xMTU4NTE5OF0sIFs0MS40MzM4NTQ5LCAtMTA4Ljc0NDg1MDY5XSwgWzQwLjY3NDcxNzQ3LCAtMTEyLjI5NjA5OTU0XSwgWzM5LjgwOTM0MzQsIC0xMTUuNzYxOTA4MjFdLCBbMzguODQzNTI3NzYsIC0xMTkuMTM2NjU2NzhdLCBbMzcuNzgzMywgLTEyMi40MTY3XV0sCiAgICAgICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiZ3JleSIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogZmFsc2UsCiAgImZpbGxDb2xvciI6ICJncmV5IiwKICAiZmlsbE9wYWNpdHkiOiAwLjIsCiAgImZpbGxSdWxlIjogImV2ZW5vZGQiLAogICJsaW5lQ2FwIjogInJvdW5kIiwKICAibGluZUpvaW4iOiAicm91bmQiLAogICJub0NsaXAiOiBmYWxzZSwKICAib3BhY2l0eSI6IDEuMCwKICAic21vb3RoRmFjdG9yIjogNTAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDUKfQogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICAuYmluZFRvb2x0aXAoIlRvbyBtdWNoIHNtb290aGluZz8iKQogICAgICAgICAgICAgICAgICAgIC5hZGRUbyhtYXBfZDJkY2ZkMDUzZmYzNDA5Y2FhYmI4ODE3ZDBhNzYyNjIpOwogICAgICAgICAgICAKPC9zY3JpcHQ+\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fbb992c9240>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Coordinates are 15 points on the great circle from Boston to\n",
    "# San Francisco.\n",
    "# Reference: http://williams.best.vwh.net/avform.htm#Intermediate\n",
    "coordinates = [\n",
    "    [42.3581, -71.0636],\n",
    "    [42.82995815, -74.78991444],\n",
    "    [43.17929819, -78.56603306],\n",
    "    [43.40320216, -82.37774519],\n",
    "    [43.49975489, -86.20965845],\n",
    "    [43.46811941, -90.04569087],\n",
    "    [43.30857071, -93.86961818],\n",
    "    [43.02248456, -97.66563267],\n",
    "    [42.61228259, -101.41886832],\n",
    "    [42.08133868, -105.11585198],\n",
    "    [41.4338549, -108.74485069],\n",
    "    [40.67471747, -112.29609954],\n",
    "    [39.8093434, -115.76190821],\n",
    "    [38.84352776, -119.13665678],\n",
    "    [37.7833, -122.4167]]\n",
    "\n",
    "\n",
    "# Create the map and add the line\n",
    "m = folium.Map(location=[41.9, -97.3], zoom_start=4)\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=coordinates,\n",
    "    color='#FF0000',\n",
    "    weight=5,\n",
    "    tooltip='From Boston to San Francisco',\n",
    ").add_to(m)\n",
    "\n",
    "folium.PolyLine(\n",
    "    smooth_factor=50,\n",
    "    locations=coordinates,\n",
    "    color='grey',\n",
    "    tooltip='Too much smoothing?',\n",
    "    weight=5\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Features_11.html'))\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Dateline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSR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ICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2Q5NmJmMzU4NWU2ZjQxZTdiNTFjYTc5MzQwNmMyYzJmIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF9kOTZiZjM1ODVlNmY0MWU3YjUxY2E3OTM0MDZjMmMyZiA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF9kOTZiZjM1ODVlNmY0MWU3YjUxY2E3OTM0MDZjMmMyZicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbMCwwXSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpvb206IDEsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhCb3VuZHM6IGJvdW5kcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxheWVyczogW10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3b3JsZENvcHlKdW1wOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciB0aWxlX2xheWVyXzU3OTRiZDRiODExNjRjNzg4ZGRiYzY5MDNmNWJiOWNkID0gTC50aWxlTGF5ZXIoCiAgICAgICAgICAgICAgICAnaHR0cHM6Ly97c30udGlsZS5vcGVuc3RyZWV0bWFwLm9yZy97en0ve3h9L3t5fS5wbmcnLAogICAgICAgICAgICAgICAgewogICJhdHRyaWJ1dGlvbiI6IG51bGwsCiAgImRldGVjdFJldGluYSI6IGZhbHNlLAogICJtYXhab29tIjogMTgsCiAgIm1pblpvb20iOiAxLAogICJub1dyYXAiOiBmYWxzZSwKICAic3ViZG9tYWlucyI6ICJhYmMiCn0KICAgICAgICAgICAgICAgICkuYWRkVG8obWFwX2Q5NmJmMzU4NWU2ZjQxZTdiNTFjYTc5MzQwNmMyYzJmKTsKICAgICAgICAKICAgIAogICAgICAgICAgICAgICAgdmFyIHBvbHlfbGluZV8xYzU0MTkzMDZhZjA0NjM1YjI2MGM4NmNjOTMxNGMzYiA9IEwucG9seWxpbmUoCiAgICAgICAgICAgICAgICAgICAgW1syLCAxNzldLCBbMiwgLTE3OV1dLAogICAgICAgICAgICAgICAgICAgIHsKICAiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsCiAgImNvbG9yIjogInJlZCIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogZmFsc2UsCiAgImZpbGxDb2xvciI6ICJyZWQiLAogICJmaWxsT3BhY2l0eSI6IDAuMiwKICAiZmlsbFJ1bGUiOiAiZXZlbm9kZCIsCiAgImxpbmVDYXAiOiAicm91bmQiLAogICJsaW5lSm9pbiI6ICJyb3VuZCIsCiAgIm5vQ2xpcCI6IGZhbHNlLAogICJvcGFjaXR5IjogMS4wLAogICJzbW9vdGhGYWN0b3IiOiAxLjAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDYKfQogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICAuYmluZFRvb2x0aXAoIldyb25nIikKICAgICAgICAgICAgICAgICAgICAuYWRkVG8obWFwX2Q5NmJmMzU4NWU2ZjQxZTdiNTFjYTc5MzQwNmMyYzJmKTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgICAgIHZhciBwb2x5X2xpbmVfODQwOGFhZjllZDAwNDg0OTkxNzAxZDVhYTE2MGMzNjIgPSBMLnBvbHlsaW5lKAogICAgICAgICAgICAgICAgICAgIFtbLTIsIDE3OV0sIFstMiwgMTgxXV0sCiAgICAgICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiYmx1ZSIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogZmFsc2UsCiAgImZpbGxDb2xvciI6ICJibHVlIiwKICAiZmlsbE9wYWNpdHkiOiAwLjIsCiAgImZpbGxSdWxlIjogImV2ZW5vZGQiLAogICJsaW5lQ2FwIjogImJ1dHQiLAogICJsaW5lSm9pbiI6ICJyb3VuZCIsCiAgIm5vQ2xpcCI6IGZhbHNlLAogICJvcGFjaXR5IjogMS4wLAogICJzbW9vdGhGYWN0b3IiOiAxLjAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDYKfQogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICAuYmluZFRvb2x0aXAoIkNvcnJlY3QiKQogICAgICAgICAgICAgICAgICAgIC5hZGRUbyhtYXBfZDk2YmYzNTg1ZTZmNDFlN2I1MWNhNzkzNDA2YzJjMmYpOwogICAgICAgICAgICAKICAgIAogICAgICAgICAgICAgICAgdmFyIHBvbHlfbGluZV9iNzk2ZWI2ZTZmNjk0N2ZlOTAxYWEzODkwMWEyNjQwZiA9IEwucG9seWxpbmUoCiAgICAgICAgICAgICAgICAgICAgW1stNiwgLTE3OV0sIFstNiwgMTc5XV0sCiAgICAgICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiZ3JlZW4iLAogICJkYXNoQXJyYXkiOiBudWxsLAogICJkYXNoT2Zmc2V0IjogbnVsbCwKICAiZmlsbCI6IGZhbHNlLAogICJmaWxsQ29sb3IiOiAiZ3JlZW4iLAogICJmaWxsT3BhY2l0eSI6IDAuMiwKICAiZmlsbFJ1bGUiOiAiZXZlbm9kZCIsCiAgImxpbmVDYXAiOiAic3F1YXJlIiwKICAibGluZUpvaW4iOiAicm91bmQiLAogICJub0NsaXAiOiBmYWxzZSwKICAib3BhY2l0eSI6IDEuMCwKICAic21vb3RoRmFjdG9yIjogMS4wLAogICJzdHJva2UiOiB0cnVlLAogICJ3ZWlnaHQiOiA2Cn0KICAgICAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAgICAgLmJpbmRUb29sdGlwKCJDb3JyZWN0IikKICAgICAgICAgICAgICAgICAgICAuYWRkVG8obWFwX2Q5NmJmMzU4NWU2ZjQxZTdiNTFjYTc5MzQwNmMyYzJmKTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgICAgIHZhciBwb2x5X2xpbmVfNzI0M2E1NDFmNGU0NDQzMmIxMTY3YzMxZTU3OTVmOGMgPSBMLnBvbHlsaW5lKAogICAgICAgICAgICAgICAgICAgIFtbMTIsIC0xNzldLCBbMTIsIDE5MF1dLAogICAgICAgICAgICAgICAgICAgIHsKICAiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsCiAgImNvbG9yIjogIm9yYW5nZSIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogZmFsc2UsCiAgImZpbGxDb2xvciI6ICJvcmFuZ2UiLAogICJmaWxsT3BhY2l0eSI6IDAuMiwKICAiZmlsbFJ1bGUiOiAiZXZlbm9kZCIsCiAgImxpbmVDYXAiOiAicm91bmQiLAogICJsaW5lSm9pbiI6ICJyb3VuZCIsCiAgIm5vQ2xpcCI6IGZhbHNlLAogICJvcGFjaXR5IjogMS4wLAogICJzbW9vdGhGYWN0b3IiOiAxLjAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDYKfQogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICAuYmluZFRvb2x0aXAoIkFydGlmYWN0PyIpCiAgICAgICAgICAgICAgICAgICAgLmFkZFRvKG1hcF9kOTZiZjM1ODVlNmY0MWU3YjUxY2E3OTM0MDZjMmMyZik7CiAgICAgICAgICAgIAo8L3NjcmlwdD4=\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fbb992a5ac8>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lon = lat = 0\n",
    "zoom_start = 1\n",
    "\n",
    "m = folium.Map(location=[lat, lon], zoom_start=zoom_start)\n",
    "\n",
    "kw = {'opacity': 1.0, 'weight': 6}\n",
    "folium.PolyLine(\n",
    "    locations=[(2, 179), (2, -179)],\n",
    "    tooltip='Wrong',\n",
    "    color='red',\n",
    "    line_cap='round',\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=[(-2, 179), (-2, 181)],\n",
    "    tooltip='Correct',\n",
    "    line_cap='butt',\n",
    "    color='blue',\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=[(-6, -179), (-6, 179)],\n",
    "    line_cap='square',\n",
    "    color='green',\n",
    "    tooltip='Correct',\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=[(12, -179), (12, 190)],\n",
    "    color='orange',\n",
    "    tooltip='Artifact?',\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'DateLineExample.html'))\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### MultiPolyline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0N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ZWZ0OiAwLjAlOwogICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzYyMDIxMTQzMTNiMzQyZjZiNWEzZjgzYjBlNTVmZGZiIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF82MjAyMTE0MzEzYjM0MmY2YjVhM2Y4M2IwZTU1ZmRmYiA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF82MjAyMTE0MzEzYjM0MmY2YjVhM2Y4M2IwZTU1ZmRmYicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbMzguODkzOTksLTc3LjAzNjU5XSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpvb206IDE3LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4Qm91bmRzOiBib3VuZHMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcnM6IFtdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd29ybGRDb3B5SnVtcDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl9jOWYyMGY1NjI4MTM0OTZhODUxZWUxYTcxMDQ1MGYyZSA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJywKICAgICAgICAgICAgICAgIHsKICAiYXR0cmlidXRpb24iOiBudWxsLAogICJkZXRlY3RSZXRpbmEiOiBmYWxzZSwKICAibWF4Wm9vbSI6IDE4LAogICJtaW5ab29tIjogMSwKICAibm9XcmFwIjogZmFsc2UsCiAgInN1YmRvbWFpbnMiOiAiYWJjIgp9CiAgICAgICAgICAgICAgICApLmFkZFRvKG1hcF82MjAyMTE0MzEzYjM0MmY2YjVhM2Y4M2IwZTU1ZmRmYik7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGNpcmNsZV9tYXJrZXJfZTM5NDA1YmMzMjViNDJhYjg5M2I5NmU3ZTY4Y2I3YTIgPSBMLmNpcmNsZU1hcmtlcigKICAgICAgICAgICAgICAgIFszOC44OTQxNSwgLTc3LjAzNzM4XSwKICAgICAgICAgICAgICAgIHsKICAiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsCiAgImNvbG9yIjogInJlZCIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogInJlZCIsCiAgImZpbGxPcGFjaXR5IjogMC4yLAogICJmaWxsUnVsZSI6ICJldmVub2RkIiwKICAibGluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAib3BhY2l0eSI6IDEuMCwKICAicmFkaXVzIjogMjAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDMKfQogICAgICAgICAgICAgICAgKQogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzYyMDIxMTQzMTNiMzQyZjZiNWEzZjgzYjBlNTVmZGZiKTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGNpcmNsZV9tYXJrZXJ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0NsaXAiOiBmYWxzZSwKICAib3BhY2l0eSI6IDEsCiAgInNtb290aEZhY3RvciI6IDAsCiAgInN0cm9rZSI6IHRydWUsCiAgIndlaWdodCI6IDgKfQogICAgICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzYyMDIxMTQzMTNiMzQyZjZiNWEzZjgzYjBlNTVmZGZiKTsKICAgICAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fbb9925b320>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lat = +38.89399\n",
    "lon = -77.03659\n",
    "zoom_start = 17\n",
    "\n",
    "m = folium.Map(location=[lat, lon], zoom_start=zoom_start)\n",
    "\n",
    "kw = {\n",
    "    'color': 'red',\n",
    "    'fill': True,\n",
    "    'radius': 20\n",
    "}\n",
    "\n",
    "folium.CircleMarker([38.89415, -77.03738], **kw).add_to(m)\n",
    "folium.CircleMarker([38.89415, -77.03578], **kw).add_to(m)\n",
    "\n",
    "\n",
    "locations = [\n",
    "    [(38.893596444352134, -77.03814983367920), (38.893379333722040, -77.03792452812195)],\n",
    "    [(38.893379333722040, -77.03792452812195), (38.893162222428310, -77.03761339187622)],\n",
    "    [(38.893162222428310, -77.03761339187622), (38.893028615148424, -77.03731298446655)],\n",
    "    [(38.893028615148424, -77.03731298446655), (38.892920059048464, -77.03691601753235)],\n",
    "    [(38.892920059048464, -77.03691601753235), (38.892903358095296, -77.03637957572937)],\n",
    "    [(38.892903358095296, -77.03637957572937), (38.893011914220770, -77.03592896461487)],\n",
    "    [(38.893011914220770, -77.03592896461487), (38.893162222428310, -77.03549981117249)],\n",
    "    [(38.893162222428310, -77.03549981117249), (38.893404384982480, -77.03514575958252)],\n",
    "    [(38.893404384982480, -77.03514575958252), (38.893596444352134, -77.03496336936950)]\n",
    "]\n",
    "\n",
    "folium.PolyLine(\n",
    "    locations=locations,\n",
    "    color='orange',\n",
    "    weight=8,\n",
    "    opacity=1,\n",
    "    smooth_factor=0,\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'MultiPolyline.html'))\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Rectangle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZ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0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIAogICAgICAgICAgICA8c3R5bGU+ICNtYXBfNGU0MzRmZWViNTJlNDBkYzhjYzQ5OWM2ZTBlZTNhMWEgewogICAgICAgICAgICAgICAgcG9zaXRpb24gOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgIHdpZHRoIDogMTAwLjAlOwogICAgICAgICAgICAgICAgaGVpZ2h0OiAxMDAuMCU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwLjAlOwogICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzRlNDM0ZmVlYjUyZTQwZGM4Y2M0OTljNmUwZWUzYTFhIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF80ZTQzNGZlZWI1MmU0MGRjOGNjNDk5YzZlMGVlM2ExYSA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF80ZTQzNGZlZWI1MmU0MGRjOGNjNDk5YzZlMGVlM2ExYScsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbMzUuNjg1LDEzOS43Nl0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6b29tOiAxNSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heEJvdW5kczogYm91bmRzLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXJzOiBbXSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdvcmxkQ29weUp1bXA6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfNTEwMWE2N2ZmZTQyNDdhNGE3OWU1MjQxMTY3ODgxNTcgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICdodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZycsCiAgICAgICAgICAgICAgICB7CiAgImF0dHJpYnV0aW9uIjogbnVsbCwKICAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsCiAgIm1heFpvb20iOiAxOCwKICAibWluWm9vbSI6IDEsCiAgIm5vV3JhcCI6IGZhbHNlLAogICJzdWJkb21haW5zIjogImFiYyIKfQogICAgICAgICAgICAgICAgKS5hZGRUbyhtYXBfNGU0MzRmZWViNTJlNDBkYzhjYzQ5OWM2ZTBlZTNhMWEpOwogICAgICAgIAogICAgCgogICAgICAgICAgICB2YXIgcmVjdGFuZ2xlXzc0MWRiNWExNjk5OTRkMDk4YjA3YWY1ZDM3MTJkNmNjID0gTC5yZWN0YW5nbGUoCiAgICAgICAgICAgICAgICBbWzM1LjY4MSwgMTM5Ljc2Nl0sIFszNS42OTEsIDEzOS43NzZdXSwKICAgICAgICAgICAgICAgIHsKICAiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsCiAgImNvbG9yIjogImJsdWUiLAogICJkYXNoQXJyYXkiOiAiNSwgNSIsCiAgImRhc2hPZm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Im9wYWNpdHkiOiAxLjAsCiAgInNtb290aEZhY3RvciI6IDEuMCwKICAic3Ryb2tlIjogdHJ1ZSwKICAid2VpZ2h0IjogNQp9CiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAuYmluZFRvb2x0aXAoIjxzdHJvbmc+Q2xpY2sgbWUhPC9zdHJvbmc+IikKICAgICAgICAgICAgICAgIC5hZGRUbyhtYXBfNGU0MzRmZWViNTJlNDBkYzhjYzQ5OWM2ZTBlZTNhMWEpOwogICAgICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgcG9wdXBfMTVkOTliNzllNGQ2NGI3Mzg2NDc4ZTNlMzllNjMwMjEgPSBMLnBvcHVwKHttYXhXaWR0aDogJzMwMCd9KTsKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGh0bWxfMDg2OTlmNjUzYTczNGUzMGEwYjc5MzViNzA0MjMyNjMgPSAkKCc8ZGl2IGlkPSJodG1sXzA4Njk5ZjY1M2E3MzRlMzBhMGI3OTM1YjcwNDIzMjYzIiBzdHlsZT0id2lkdGg6IDEwMC4wJTsgaGVpZ2h0OiAxMDAuMCU7Ij5Ub2t5bywgSmFwYW48L2Rpdj4nKVswXTsKICAgICAgICAgICAgICAgIHBvcHVwXzE1ZDk5Yjc5ZTRkNjRiNzM4NjQ3OGUzZTM5ZTYzMDIxLnNldENvbnRlbnQoaHRtbF8wODY5OWY2NTNhNzM0ZTMwYTBiNzkzNWI3MDQyMzI2Myk7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgcmVjdGFuZ2xlXzI4YTcyYTM3YmU2YjQxNmFhOWQ3MTI0YTE4ZTM0YmVmLmJpbmRQb3B1cChwb3B1cF8xNWQ5OWI3OWU0ZDY0YjczODY0NzhlM2UzOWU2MzAyMSk7CgogICAgICAgICAgICAKICAgICAgICAKPC9zY3JpcHQ+\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fbb992c2ef0>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[35.685, 139.76], zoom_start=15)\n",
    "\n",
    "kw = {\n",
    "    'color': 'blue',\n",
    "    'line_cap': 'round',\n",
    "    'fill': True,\n",
    "    'fill_color': 'red',\n",
    "    'weight': 5,\n",
    "    'popup': 'Tokyo, Japan',\n",
    "    'tooltip': '<strong>Click me!</strong>',\n",
    "}\n",
    "\n",
    "folium.Rectangle(\n",
    "    bounds=[[35.681, 139.766], [35.691, 139.776]],\n",
    "    line_join='round',\n",
    "    dash_array='5, 5',\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "dx = 0.012\n",
    "folium.Rectangle(\n",
    "    bounds=[[35.681, 139.766-dx], [35.691, 139.776-dx]],\n",
    "    line_join='mitter',\n",
    "    dash_array='5, 10',\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "\n",
    "folium.Rectangle(\n",
    "    bounds=[[35.681, 139.766-2*dx], [35.691, 139.7762-2*dx]],\n",
    "    line_join='bevel',\n",
    "    dash_array='15, 10, 5, 10, 15',\n",
    "    **kw,\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Rectangle_and_Polygon_0.html'))\n",
    "\n",
    "m\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Polygon"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPg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5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2RkYmMxOTA0NzJkNjQ0MmM5MWM0OTVmYTBmY2ZiMzI2IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF9kZGJjMTkwNDcyZDY0NDJjOTFjNDk1ZmEwZmNmYjMyNiA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF9kZGJjMTkwNDcyZDY0NDJjOTFjNDk1ZmEwZmNmYjMyNicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbMzUuNjcsMTM5Ljc4XSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpvb206IDEzLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4Qm91bmRzOiBib3VuZHMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXllcnM6IFtdLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd29ybGRDb3B5SnVtcDogZmFsc2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl8yNjUxNjBkZTc2ODM0ZGQ3OTY3N2ZmMzhiODRmMjZlNCA9IEwudGlsZUxheWVyKAogICAgICAgICAgICAgICAgJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJywKICAgICAgICAgICAgICAgIHsKICAiYXR0cmlidXRpb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gICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHBvcHVwX2VhMTk3MDI2ZTRlMjQ2ZTM5YjllZWNiYzY2N2M2ZTEwID0gTC5wb3B1cCh7bWF4V2lkdGg6ICczMDAnfSk7CgogICAgICAgICAgICAKICAgICAgICAgICAgICAgIHZhciBodG1sXzhiZDc1NjY1ZmZjYTQ2OGI5YTljNTJmOTk3NWZlMjY4ID0gJCgnPGRpdiBpZD0iaHRtbF84YmQ3NTY2NWZmY2E0NjhiOWE5YzUyZjk5NzVmZTI2OCIgc3R5bGU9IndpZHRoOiAxMDAuMCU7IGhlaWdodDogMTAwLjAlOyI+VG9reW8sIEphcGFuPC9kaXY+JylbMF07CiAgICAgICAgICAgICAgICBwb3B1cF9lYTE5NzAyNmU0ZTI0NmUzOWI5ZWVjYmM2NjdjNmUxMC5zZXRDb250ZW50KGh0bWxfOGJkNzU2NjVmZmNhNDY4YjlhOWM1MmY5OTc1ZmUyNjgpOwogICAgICAgICAgICAKCiAgICAgICAgICAgIHBvbHlnb25fZGE1YThjNGMwOTA0NDYwMGI2YjZjNjYxNjFiNDQ0NTUuYmluZFBvcHVwKHBvcHVwX2VhMTk3MDI2ZTRlMjQ2ZTM5YjllZWNiYzY2N2M2ZTEwKTsKCiAgICAgICAgICAgIAogICAgICAgIAo8L3NjcmlwdD4=\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fbb99217828>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = folium.Map(location=[35.67, 139.78], zoom_start=13)\n",
    "\n",
    "locations = [\n",
    "    [35.6762, 139.7795],\n",
    "    [35.6718, 139.7831],\n",
    "    [35.6767, 139.7868],\n",
    "    [35.6795, 139.7824],\n",
    "    [35.6787, 139.7791]\n",
    "]\n",
    "\n",
    "folium.Polygon(\n",
    "    locations=locations,\n",
    "    color='blue',\n",
    "    weight=6,\n",
    "    fill_color='red',\n",
    "    fill_opacity=0.5,\n",
    "    fill=True,\n",
    "    popup='Tokyo, Japan',\n",
    "    tooltip='Click me!',\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Rectangle_and_Polygon_1.html'))\n",
    "\n",
    "m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVMgPSBmYWxzZTsgTF9OT19UT1VDSCA9IGZhbHNlOyBMX0RJU0FCTEVfM0QgPSBmYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMv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GluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MDtib3R0b206MDtyaWdodDowO2xlZnQ6MDt9PC9zdHlsZT4KICAgIAogICAgICAgICAgICA8c3R5bGU+ICNtYXBfMmRkYzdlNGViZGJlNDc1YWE2ZGZhYmIzZTY2YzMwN2IgewogICAgICAgICAgICAgICAgcG9zaXRpb24gOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgIHdpZHRoIDogMTAwLjAlOwogICAgICAgICAgICAgICAgaGVpZ2h0OiAxMDAuMCU7CiAgICAgICAgICAgICAgICBsZWZ0OiAwLjAlOwogICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzJkZGM3ZTRlYmRiZTQ3NWFhNmRmYWJiM2U2NmMzMDdiIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGJvdW5kcyA9IG51bGw7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgdmFyIG1hcF8yZGRjN2U0ZWJkYmU0NzVhYTZkZmFiYjNlNjZjMzA3YiA9IEwubWFwKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ21hcF8yZGRjN2U0ZWJkYmU0NzVhYTZkZmFiYjNlNjZjMzA3YicsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7Y2VudGVyOiBbNy41Nzc3OTgxMTM5OTE4MzIsOC45OTczMTExMDQ1MjM5M10sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6b29tOiAxNiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1heEJvdW5kczogYm91bmRzLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXJzOiBbXSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdvcmxkQ29weUp1bXA6IGZhbHNlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfNWZkMGQzM2E4Y2UxNDkwODhmY2RjNDA2ZDAzNGJkNWQgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICdodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZycsCiAgICAgICAgICAgICAgICB7CiAgImF0dHJpYnV0aW9uIjogbnVsbCwKICAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsCiAgIm1heFpvb20iOiAxOCwKICAibWluWm9vbSI6IDEsCiAgIm5vV3JhcCI6IGZhbHNlLAogICJzdWJkb21haW5zIjogImFiYyIKfQogICAgICAgICAgICAgICAgKS5hZGRUbyhtYXBfMmRkYzdlNGViZGJlNDc1YWE2ZGZhYmIzZTY2YzMwN2IpOwogICAgICAgIAogICAgCgogICAgICAgICAgICB2YXIgcG9seWdvbl8zZjQ5NTI0OWExNjA0ZTg4YThhOGUyYzI3MWQzNjk1NyA9IEwucG9seWdvbigKICAgICAgICAgICAgICAgIFtbWzcuNTc3Nzk0MzI2OTQ2NjczLCA4Ljk5ODUwMzkwMTQzMzkzNV0sIFs3LjU3Nzg1MTQzNDc5NTk0NSwgOC45OTg1NzI0MzA2NzMxNjRdLCBbNy41Nzc5ODg0OTE0NzU3NjQsIDguOTk4NjUyMzgwNDAzMDg3XSwgWzcuNTc4MTA1NTYwNzIzMDg4LCA4Ljk5ODQyNjgwNzA1MTU0NF0sIFs3LjU3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OC45OTgwMDI3NTYwMjI0MDJdLCBbNy41Nzc2NDg3NTQ1ODYzOTEsIDguOTk3Nzg0NDYwODg0MTldLCBbNy41Nzc1NDU5MTE3MTQ0ODEsIDguOTk4MDY5MzE2NjQ1NjgzXSwgWzcuNTc3ODY1NzExNTMzNDMzLCA4Ljk5ODI1MjA1OTc4NDc2MV1dXSwKICAgICAgICAgICAgICAgIHsKICAiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsCiAgImNvbG9yIjogImNyaW1zb24iLAogICJkYXNoQXJyYXkiOiBudWxsLAogICJkYXNoT2Zmc2V0IjogbnVsbCwKICAiZmlsbCI6IGZhbHNlLAogICJmaWxsQ29sb3IiOiAiY3JpbXNvbiIsCiAgImZpbGxPcGFjaXR5IjogMC4yLAogICJmaWxsUnVsZSI6ICJldmVub2RkIiwKICAibGluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAibm9DbGlwIjogdHJ1ZSwKICAib3BhY2l0eSI6IDEuMCwKICAic21vb3RoRmFjdG9yIjogMiwKICAic3Ryb2tlIjogdHJ1ZSwKICAid2VpZ2h0IjogMwp9CiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAuYmluZFRvb2x0aXAoIkhpIHRoZXJlISIpCiAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzJkZGM3ZTRlYmRiZTQ3NWFhNmRmYWJiM2U2NmMzMDdiKTsKICAgICAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
      ],
      "text/plain": [
       "<folium.folium.Map at 0x7fbb991b4ef0>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "locations = [\n",
    "    [\n",
    "        [7.577794326946673, 8.998503901433935],\n",
    "        [7.577851434795945, 8.998572430673164],\n",
    "        [7.577988491475764, 8.998652380403087],\n",
    "        [7.578105560723088, 8.998426807051544],\n",
    "        [7.577891409660878, 8.998289750371725],\n",
    "        [7.577794326946673, 8.998503901433935],\n",
    "    ],\n",
    "    [\n",
    "        [7.578139824893071, 8.999291979141560],\n",
    "        [7.578359687549607, 8.999414759083890],\n",
    "        [7.578456769364435, 8.999266281014116],\n",
    "        [7.578471046101925, 8.999197181604700],\n",
    "        [7.578247331649095, 8.999094883721964],\n",
    "        [7.578139824893071, 8.99929197914156]],\n",
    "    [\n",
    "        [7.577851730672876, 8.997811268775080],\n",
    "        [7.578012579816743, 8.997460464828633],\n",
    "        [7.577798113991832, 8.997311104523930],\n",
    "        [7.577667902951418, 8.997663440915119],\n",
    "        [7.577851730672876, 8.997811268775080]\n",
    "    ],\n",
    "    [\n",
    "        [7.578562417221803, 8.999551816663029],\n",
    "        [7.578688052511666, 8.999654609172921],\n",
    "        [7.578813688700849, 8.999443313458185],\n",
    "        [7.578670920426703, 8.999369073523950],\n",
    "        [7.578562417221803, 8.999551816663029]\n",
    "    ],\n",
    "    [\n",
    "        [7.577865711533433, 8.998252059784761],\n",
    "        [7.577989601239152, 8.998002756022402],\n",
    "        [7.577648754586391, 8.997784460884190],\n",
    "        [7.577545911714481, 8.998069316645683],\n",
    "        [7.577865711533433, 8.998252059784761]\n",
    "    ]\n",
    "]\n",
    "\n",
    "m = folium.Map(\n",
    "    location=[7.577798113991832, 8.997311104523930],\n",
    "    zoom_start=16\n",
    ")\n",
    "\n",
    "folium.Polygon(\n",
    "    locations=locations,\n",
    "    smooth_factor=2,\n",
    "    color='crimson',\n",
    "    no_clip=True,\n",
    "    tooltip='Hi there!'\n",
    ").add_to(m)\n",
    "\n",
    "m.save(os.path.join('results', 'Rectangle_and_Polygon_2.html'))\n",
    "\n",
    "m"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
